[IA64] MCA support - Disable CPE interrupt mode for dom0
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 15 Nov 2006 18:55:04 +0000 (11:55 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Wed, 15 Nov 2006 18:55:04 +0000 (11:55 -0700)
   This patch disables CPE interupt mode for dom0. In current MCA
implementaion, CPE interrupts do not notify to dom0. The dom0 is
expected to get error logs in polling mode.

   Therefore I modified the ACPI table to disable CPE interrupt mode
in before the address of it is passed through to dom0. I think that
there is no problem because the initialization of ACPI is completed by
the passed time even if this modification is added.

Signed-off-by: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
xen/arch/ia64/xen/dom_fw.c

index b2c3f8ef6a24b5fe7b8575f11e9706d1fa68e163..856a665bcd0b1df133cfdbcad2975e10ccf0a15b 100644 (file)
@@ -240,6 +240,23 @@ acpi_update_lsapic (acpi_table_entry_header *header, const unsigned long end)
        return 0;
 }
 
+static int __init
+acpi_patch_plat_int_src (
+       acpi_table_entry_header *header, const unsigned long end)
+{
+       struct acpi_table_plat_int_src *plintsrc;
+
+       plintsrc = (struct acpi_table_plat_int_src *)header;
+       if (!plintsrc)
+               return -EINVAL;
+
+       if (plintsrc->type == ACPI_INTERRUPT_CPEI) {
+               printk("ACPI_INTERRUPT_CPEI disabled for Domain0\n");
+               plintsrc->type = -1;
+       }
+       return 0;
+}
+
 static u8
 generate_acpi_checksum(void *tbl, unsigned long len)
 {
@@ -271,7 +288,11 @@ static void touch_acpi_table(void)
 {
        lsapic_nbr = 0;
        if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_update_lsapic, 0) < 0)
-               printk("Error parsing MADT - no LAPIC entires\n");
+               printk("Error parsing MADT - no LAPIC entries\n");
+       if (acpi_table_parse_madt(ACPI_MADT_PLAT_INT_SRC,
+                                 acpi_patch_plat_int_src, 0) < 0)
+               printk("Error parsing MADT - no PLAT_INT_SRC entries\n");
+
        acpi_table_parse(ACPI_APIC, acpi_update_madt_checksum);
 
        return;